var msj = "*****2010 ***** Andean Trading Company *****\n       Developed by System Team ";
document.onkeydown = function(){
    if(window.event && window.event.keyCode == 112){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 113){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 114){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 115){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 116){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 117){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 118){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 119){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 120){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 121){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 122){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 123){
        window.event.keyCode = 505;
    }
    if(window.event && window.event.keyCode == 505){
        alert(msj);
        return false;
    }
}
function keyhandler(e) {
    if (document.layers)
        Key = e.which;
    else
        Key = window.event.keyCode;
  
    if (Key != 0)
        alert("Key pressed! ASCII-value: " + Key);
}

function handlePress(e) {
    var shiftPressed = (window.Event) ? e.modifiers & Event.SHIFT_MASK : e.shiftKey;
    var ctrlPressed = (window.Event) ? e.modifiers & Event.CONTROL_MASK : e.ctrlKey;
    var altPressed = (window.Event) ? e.modifiers & Event.ALT_MASK : e.altKey;
    if (shiftPressed) {
        alert("La tecla Shift esta deshabilitada en estas p�gina");
        e.cancelBubble = true;
        return false;
    }
    if (ctrlPressed) {
        alert("La tecla Control esta deshabilitada en estas p�gina");
        e.cancelBubble = true;
        return false;
    }
    if (altPressed) {
        alert("La tecla Alt esta deshabilitada en estas p�gina");
        e.cancelBubble = true;
        return false;
    }
    else return true;
}

function noLeftClick(evt){
    evt = (evt)?evt:(window.event)?window.event:"";
    if (evt) {
        var elem = (evt.target)?evt.target:evt.srcElement;
        if (evt.button==2) {
            alert(msj);
            return false;
        }
        if (evt.button==3) {
            alert(msj);
            return false;
        }

    }
}
function inhabilitar(){ 
    return false ;
} 
function cambiarIcon(icon){
    var el = document.getElementById("imClose");
    if(icon=="2"){
        el.src="js/ext/resources/images/default/layout/close2.gif";
    }else{
        el.src="js/ext/resources/images/default/layout/close1.gif";
    }
}
document.oncontextmenu=inhabilitar ;
//document.onselectstart = inhabilitar; 
document.ondragstart = inhabilitar ;
